<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>码匠社区</title>
    <title th:replace="head :: htmlHead"></title>
</head>
<body>
<div th:insert="navigation :: headBar"></div>
<div class="container-fluid main">
    <div class="row">
        <div class="col-lg-9 col-sm-12">
            <h2 style="display: flex">
                <span class="glyphicon glyphicon-list" aria-hidden="true"></span>
                <span>&emsp;发现</span>
            </h2>
            <hr>
            <div class="media" style="display: flex; box-shadow: 0 0 5px #888888;border-radius: 5px;padding: 5px;" th:each="question : ${questionList}">
                <div class="media-left">
                    <a href="#"><img style="width: 40px; height: 40px;" th:src="${question.avatarUrl}" class="media-object img-thumbnail" alt="用户头像"></a>
                </div>
                <div class="media-body">
                    <a th:href="@{'/question/' + ${question.id}}"><h4 class="media-heading">[[${question.title}]]</h4></a>
                    <span style="font-size: 12px;color: #999999"> [[${question.commentCount}]] 个回复 • [[${question.viewCount}]] 次浏览 • [[${#dates.format(question.gmtModify,'yyyy MMMM dd日 HH:mm')}]]</span>
                </div>
            </div>
            <nav aria-label="Page navigation">
                <ul class="pager">
                    <li class="previous"><a th:href="@{/(page=(${page} - 1))}" th:if="${page} &gt; 1"><span aria-hidden="true">&larr;</span> Newer</a></li>
                    <li class="next"><a th:href="@{/(page=(${page} + 1))}" th:if="${page} &lt; ${pageCount}">Older <span aria-hidden="true">&rarr;</span></a></li>
                </ul>
            </nav>
        </div>
        <div class="col-lg-3 col-sm-12">
            <h3>热门话题</h3>
        </div>
    </div>
</div>
</body>
</html>